Lintcode: Backpack
DP. boolean d[i][j]: For the first i items, can we fill a backpack of size j? true or false ...
DP. boolean d[i][j]: For the first i items, can we fill a backpack of size j? true or false ...
這道題在Best Time to Buy and Sell Stock III做過,那道題只是把k取了2而已 遞推式依然是 local[i][j]=max(global[i-1][j ...